package com.jiyiren.demospring.controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by yiji on 2017/2/18.
 */
@Controller
@RequestMapping("/hello")
public class Hello {
    private static Log logger= LogFactory.getLog(Hello.class);
    @RequestMapping("/world")
    public String world(){
//        logger.info("Hello");
//        logger.trace("trace message");
//        logger.debug("我是debug信息");
//        logger.info("我是info信息");
//        logger.warn("我是warn信息");
//        logger.error("我是error信息");
//        logger.fatal("我是fatal信息");
        return "Hello";
    }

    @RequestMapping(value="/page/{which}",method = RequestMethod.GET)
    public String getPage(@PathVariable("which") String which){
        System.out.println("which:"+which);
        return "Hello";
    }


}
